home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
qbprog.EXE
/
BLASTER.ASM
< prev
next >
Wrap
Assembly Source File
|
1995-09-27
|
5KB
|
310 lines
jumps
locals @@
QB7 equ
.model medium,basic
extrn STRINGADDRESS:far
.code
SetDta proc basic yenidta:word
push yenidta
call stringaddress
push ds
mov ds,dx
mov dx,ax
mov ah,1ah
int 21h
pop ds
ret
SetDta endp
GetDta proc basic
push es bx
mov ah,2fh
int 21h
mov ax,bx
mov dx,es
pop bx es
ret
GetDta endp
;DECLARE FUNCTION FindFirst%(ara$,dta$,BYVAL fattr%)
public FindFirst
FindFirst proc basic aranan:word,yenidta:word,fattr:word
push bx
call far ptr GetDta
push ax dx
call SetDta Basic, yenidta
push aranan
call stringaddress
push ds
mov ds,dx
mov dx,ax
mov ah,4eh
mov cx,fattr
int 21h
pop ds
jb @@DosyaBitti
mov ax,-1
jmp @@DosyaBulundu
@@DosyaBitti:
mov ax,0
@@DosyaBulundu:
pop bx dx
push ax
push ds
mov ds,bx
mov ah,1ah
int 21h
pop ds
pop ax
pop bx
ret
FindFirst endp
;DECLARE SUB FindNext%(dta$)
public FindNext
FindNext proc basic yenidta:word
push ds
call far ptr GetDta
push ax dx
call SetDta Basic, yenidta
mov ah,4fh
int 21h
jb @@DosyaBitti
mov ax,-1
jmp @@DosyaBulundu
@@DosyaBitti:
mov ax,0
@@DosyaBulundu:
pop ds dx
push ax
mov ah,1ah
int 21h
pop ax
pop ds
ret
FindNext endp
public Bekleme
Bekleme proc far
push ax bx cx ds es si
xor ax,ax
mov ds,ax
mov bx,ax
mov ax,0b900h
mov es,ax
mov ax,ds:[1132]
tickbas:
cmp ax,ds:[1132]
jz tickbas
mov si,0
mov ax,ds:[1132]
Toplama:
inc si
mov es:[bx],si
cmp si,65000
jnz Devamet
mov si,es:[bx+2]
inc si
mov es:[bx+2],si
mov si,0
Devamet:
cmp ax,ds:[1132]
jz Toplama
pop si es ds cx bx ax
bekleme endp
public SBlaster
SBlaster proc far
push bp
mov bp, sp
push ax bx cx dx ds es si di
mov ax,0b900h
mov ds,ax
mov dx,30
xor ax,ax
mov ax,3d00h
int 21h
jb hata
mov ds:[6],ax
Dongu:
mov bx,ds:[6]
mov si,ds:[8]
cmp si,ds:[10]
jz @@SON
mov cx,ds:[si]
mov dx,ds:[si+2]
mov ax,4200h
push ds
int 21h
pop ds
mov dx,ds:[si+6]
mov ds:[14],dx
mov dx,ds:[si+4]
mov ds:[12],dx
add si,8
mov ds:[8],si
push ds
mov cx,ds:[12]
mov dx,ds:[2]
mov ax,ds:[0]
mov ds,ax
mov ah,3fh
int 21h
call dinle
pop ds
jmp Dongu
@@SON:
mov ah,3eh
int 21h
hata:
pop di si es ds dx cx bx ax
pop bp
retf
Sblaster Endp
dinle proc near
mov si,dx
mov di,si
add di,cx
mov ax,0b900h
mov es,ax
mov dx,es:[4]
mov cx,es:[14]
Musaitmi:
in al,60h
cmp al,1
jz son2
in al,dx
and al,80h
jne Musaitmi
push cx
xor ax,ax
@@bekle:
inc ax
cmp ax,cx
jnz @@bekle
pop cx
mov al,10h
out dx,al
BeniBekle:
in al,dx
and al,80h
jne BeniBekle
mov al,ds:[si]
out dx,al
inc si
cmp si,di
jnz Musaitmi
ret
son2:
mov ax,0b900h
mov ds,ax
mov si,ds:[10]
mov ds:[8],si
ret
dinle endp
public Kaydet
Kaydet proc far
push bp
mov bp, sp
push ax bx cx dx ds di si es
mov ax,0b900h
mov ds,ax
mov ax,ds:[4]
mov es,ax
mov dx,10
mov ah,3ch
mov cx,0
INT 21H
JB DosyaAcmaHata
mov bx,ax
mov cx,32
mov ah,40h
INT 21h
BuyukDongu:
mov si,ds:[6]
mov di,si
add di,54000
KucukDongu:
mov dx,ds:[2]
add dx,0eh
in al,dx
mov ah,al
sub dx,2
mov al,20h
out dx,al
mov cx,ds:[0]
xor ax,ax
Frekans:
inc ax
cmp ax,cx
jnz Frekans
MinikDongu:
in al,60h
cmp al,1
jz @@SON
in al,dx
and al,80h
jne MinikDongu
add dx,2
VeriGeldimi:
in al,dx
cmp al,ah
jz VeriGeldimi
sub dx,4
in al,dx
mov es:[si],al
inc si
cmp si,di
JNZ KucukDongu
Call Yaz
JMP BuyukDongu
@@SON:
Call Yaz
mov ah,3eh
INT 21h
DosyaAcmaHata:
pop es si di ds dx cx bx ax
pop bp
retf
Kaydet Endp
Yaz Proc near
mov cx,si
mov dx,ds:[6]
sub cx,dx
push ds
push es
pop ds
mov ah,40h
INT 21h
pop ds
Ret
Yaz Endp
End